module(
    name = "rules_erlang",
    version = "3.14.0",
    compatibility_level = 3,
)

bazel_dep(
    name = "rules_go",
    version = "0.41.0",
    repo_name = "io_bazel_rules_go",
)
bazel_dep(
    name = "bazel_skylib",
    version = "1.4.2",
)
bazel_dep(
    name = "gazelle",
    version = "0.33.0",
    repo_name = "bazel_gazelle",
)

go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "@rules_erlang//:go.mod")
use_repo(
    go_deps,
    "com_github_bazelbuild_buildtools",
    "com_github_bmatcuk_doublestar_v4",
    "in_gopkg_yaml_v2",
)

erlang_package = use_extension(
    "//bzlmod:extensions.bzl",
    "erlang_package",
)
erlang_package.hex_package(
    name = "thoas_rules_erlang",
    pkg = "thoas",
    build_file = "@rules_erlang//:BUILD.thoas",
    sha256 = "fc763185b932ecb32a554fb735ee03c3b6b1b31366077a2427d2a97f3bd26735",
    version = "1.0.0",
)
use_repo(
    erlang_package,
    "getopt_src",
    "xref_runner_src",
    "thoas_rules_erlang",
)

erlang_config_extension = use_extension(
    "@rules_erlang//bzlmod:extensions.bzl",
    "erlang_config",
)
use_repo(
    erlang_config_extension,
    "erlang_config",
)

register_toolchains(
    "@erlang_config//external:toolchain_major",
    "@erlang_config//external:toolchain_major_minor",
)
